/*
 * @Author: ReinerLau lk850593913@gmail.com
 * @Date: 2022-09-14 16:41:17
 * @LastEditors: ReinerLau lk850593913@gmail.com
 * @LastEditTime: 2022-10-26 09:40:37
 * @FilePath: \robot\src\api\system-configuration.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import request from "@/utils/request";

// 获取系统配置列表
export function fetchList(params) {
  return request({
    url: "/system-configuration/v1/",
    method: "get",
    params: params,
  });
}

// 删除系统配置项
export function deleteConfiguration(id) {
  return request({
    url: "/system-configuration/v1/" + id,
    method: "delete",
  });
}

// 创建系统配置项
export function createConfiguration(data) {
  return request({
    url: "/system-configuration/v1/",
    method: "post",
    data: data,
  });
}

// 更新系统配置项
export function updateConfiguration(id, data) {
  return request({
    url: "/system-configuration/v1/",
    method: "put",
    data: data,
  });
}

export function getConfiguration(id) {
  return request({
    url: "/system-configuration/v1/getone/" + id,
    method: "get",
  });
}
